package com.zyd.blog.persistence.mapper;

import com.zyd.blog.persistence.beans.CommentRelation;
import com.zyd.blog.persistence.beans.CommentReply;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.BaseMapper;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author liusongqi
 * @since 2020-02-14
 */
@Repository
public interface CommentRelationMapper extends BaseMapper<CommentRelation> {
    Integer commentCount(@Param(value = "commentId") String commentId, @Param(value = "userId") String userId);

    Integer update(@Param(value = "commentId") String commentId, @Param(value = "userId") String userId);
    Integer reduceZanUpdate(@Param(value = "commentId") String commentId, @Param(value = "userId") String userId);
    Integer commentUpdate(@Param(value = "replyId") String replyId, @Param(value = "userId") String userId);

    Integer deleteCommentRelation(@Param(value = "commentId") String commentId);



}
